/** @file frgui.h
 * @brief fgui structure
 * @author    - Robert Zhang <armner@gmail.com>
 *            - Wismy Yao <aheynie@gamil.com>
 * @date 2010/10/20
 * @version 1.0.0
 * @note
 */
#include "stdint.h"

#ifndef _FRGUI_H_
#define	_FRGUI_H_

//#define MAX_MSG (16)
//#define MSG_MSK (MAX_MSG-1)
#include "config_frgui.h"

class Widget;
typedef Widget* HWND;    ///< window handle
typedef int LPARAM;    ///< parameter1
typedef int WPARAM;    ///< parameter2
typedef int TWND;    ///< window type
typedef int WTYPE;

/**
 * @def NUL
 * @brief 
 */
#define NUL     (0)


/**
 * @brief event handler
 */
typedef int (*EventHandler)(HWND hWnd,int mess,WPARAM wParam, LPARAM lParam);

/** @brief window location */
typedef struct WINDOW_LOCATION
{
    short x;//< value 1
    short y;//< value 2
} Point;

/** @brief winow size */
typedef struct RECT{
    short x0,y0;//< upper lefr corner coordinates
    short x1,y1;//< Lower right corner coordinates
} Rect;

/** @brief rectangular constants */
typedef Rect* PRect;

/**
 * @def getParent(w)
 * @brief get parent window
 */
#define getParent(w)    ( w->parent)

#endif
